package com.knight.admin.common.constant;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.jfinal.kit.PropKit;
import com.knight.admin.common.model.AdminMenu;

public class Constant {

	public static List<AdminMenu> getAdminMenus() {
		List<AdminMenu> adminMenus = new ArrayList<AdminMenu>();
		AdminMenu a1 = new AdminMenu("/menu/parentMenu", "网站菜单管理");
		AdminMenu a2 = new AdminMenu("/project/childMenu", "工程案例管理");
		AdminMenu a3 = new AdminMenu("/news/list", "新闻管理");
		adminMenus.add(a1);
		adminMenus.add(a2);
		adminMenus.add(a3);
		return adminMenus;
	}

	/**
	 * 存放登录信息的key
	 */
	public static final String LOGINUSER = "loginUser";

	/**
	 * 图片上传路径
	 */
	public static final String UPLOAD_IMAGE_FILE_PATH = PropKit.get("uploadImagePath");

	/**
	 * web资源路径
	 */
	public static final String WEB_RESOURSE_URL = PropKit.get("webResourceUrl");

	/**
	 * 访问图片前缀
	 */
	public static final String ACCESS_IMAGE_PRE= File.separator + "images"+File.separator;
	
	
	/**
	 * json相应常量
	 * 
	 * @author YQ
	 *
	 */
	public interface JsonConstant {
		public final static String SUCCESS_SUCCESS = "0";
		public final static String SUCCESS_ERROR = "1";

	}

	/**
	 * 相关符号
	 * 
	 * @author YQ
	 *
	 */
	public interface Symbo {
		public final static String COMMA = ",";
		public final static String CONNECTION = "-";
	}

	/**
	 * 编码格式
	 * 
	 * @author YQ
	 *
	 */
	public interface EnCodeFormat {
		public final static String UTF8 = "UTF-8";
	}

	/**
	 * 异常信息
	 * 
	 * @author YQ
	 *
	 */
	public interface ExceptionMessage {
		public final static String REQUEST_PARAMETER_FORMAT_ERROR = "请求参数格式错误";

		public final static String REQUEST_PARAMETER_EXCEPTION = "请求参数异常";

		public final static String PARAMETER_IS_NULL = "参数为空";
	}

	/**
	 * 菜单类型
	 * 
	 * @author YQ
	 *
	 */
	public interface MenuTypes {
		/** 一级菜单 **/
		public final static String LEVEL_ONE_MENU = "1";
		/** 二级菜单 **/
		public final static String LEVEL_TWO_MENU = "2";
	}

	public interface ParentMenuId {
		public final static String INDEX_ID = "00001";
		public final static String ABOUT_ID = "00002";
		public final static String NEWS_ID = "00003";
		public final static String HONORS_ID = "00004";
		public final static String PROJECTS_ID = "00005";
		public final static String SERVICEFLOW_ID = "00006";
		public final static String CUSTOMERMESSAGE_ID = "00007";
		public final static String CONTACTUS_ID = "00008";
	}

	public interface TopMenusName {
		public final static String INDEX = "首页";
		public final static String ABOUT = "关于我们";
		public final static String NEWS = "新闻中心";
		public final static String HONORS = "资质荣誉";
		public final static String PROJECTS = "工程案例";
		public final static String SERVICEFLOW = "服务流程";
		public final static String CUSTOMERMESSAGE = "客户留言";
		public final static String CONTACTUS = "联系我们";

		public final static String INDEX_URL = "/";
		public final static String ABOUT_URL = "/about";
		public final static String NEWS_URL = "/news";
		public final static String HONORS_URL = "/shidaifong";
		public final static String PROJECTS_URL = "/projects";
		public final static String SERVICEFLOW_URL = "/serviceflow";
		public final static String CUSTOMERMESSAGE_URL = "/customermessage";
		public final static String CONTACTUS_URL = "/contactus";
	}

	public interface QiniuConfig {
		public final static String ACCESS_KEY = "EMnfPGMQY7tDCc-7yMg1_emKUogYi5o6A20HF1f5";
		public final static String SECRET_KEY = "zuymYGjwht6NxCetysFHhoGV31LzKt97FISUk9-v";
		public final static String BUCKET_NAME = "decoration";
	}
}
